package com.sauron.starter.constants;

public class MsgCode {

    private int code;
    private String msg;

    private MsgCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    // 基本值
    public static final MsgCode SUCCESS = new MsgCode(2000,"success");
    public static final MsgCode ERROR = new MsgCode(5000,"internal server error");
    public static final MsgCode PARAM_EMPTY = new MsgCode(4000,"empty param");

    // 业务值
    public static final MsgCode PARAM_ERROR = new MsgCode(4001,"params error");

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
